﻿namespace Pub.Class
{
    using System;

    public class SearchInfo
    {
        private Pub.Class.Operator andor;
        private string fieldName;
        private object fieldValue;
        private Pub.Class.Operator oper;
        private int type;
        private bool where;

        public SearchInfo()
        {
        }

        public SearchInfo(Pub.Class.Operator andor, string fieldName, object fieldValue, Pub.Class.Operator oper, int type) : this(andor, fieldName, fieldValue, oper, type, false)
        {
        }

        public SearchInfo(Pub.Class.Operator andor, string fieldName, object fieldValue, Pub.Class.Operator oper, int type, bool where)
        {
            this.andor = andor;
            this.fieldName = fieldName;
            this.fieldValue = fieldValue;
            this.oper = oper;
            this.where = where;
            this.type = type;
        }

        public Pub.Class.Operator AndOr
        {
            get
            {
                return this.andor;
            }
            set
            {
                this.andor = value;
            }
        }

        public string FieldName
        {
            get
            {
                return this.fieldName;
            }
            set
            {
                this.fieldName = value;
            }
        }

        public object FieldValue
        {
            get
            {
                return this.fieldValue;
            }
            set
            {
                this.fieldValue = value;
            }
        }

        public Pub.Class.Operator Operator
        {
            get
            {
                return this.oper;
            }
            set
            {
                this.oper = value;
            }
        }

        public int Type
        {
            get
            {
                return this.type;
            }
            set
            {
                this.type = value;
            }
        }

        public bool Where
        {
            get
            {
                return this.where;
            }
            set
            {
                this.where = value;
            }
        }
    }
}

